package com.psp.bu.service;

import com.psp.bu.controller.res.bean.RApplySPListBean;
import com.psp.bu.controller.res.bean.RJoinedSPBean;
import com.psp.bu.controller.res.bean.RSPCommentListBean;
import com.psp.bu.controller.res.bean.RSPDetailBean;
import com.psp.bu.controller.res.bean.RSPOrderListBean;
import com.psp.bu.service.exception.ServiceException;
import com.psp.bu.service.impl.PageResult;

public interface SPService {

	/**
	 * 获取已经加入的服务商
	 * 
	 * @param page
	 * @param pageSize
	 * @param name
	 * @param uid
	 * @return
	 */
	PageResult<RJoinedSPBean> getJoined(int page, int pageSize, String name, String uid);

	/**
	 * 获取申请的服务商
	 * 
	 * @param page
	 * @param pageSize
	 * @param name
	 * @param uid
	 * @return
	 */
	PageResult<RApplySPListBean> getApply(int page, int pageSize, String name, String uid);

	/**
	 * 同意服务商申请
	 * 
	 * @param uid
	 * @param spid
	 * @return
	 */
	boolean agreeJoin(String uid, String spid) throws ServiceException;

	/**
	 * 驳回服务商参加
	 * 
	 * @param uid
	 * @param spid
	 * @return
	 * @throws ServiceException
	 */
	boolean disagreeJoin(String uid, String spid) throws ServiceException;

	/**
	 * 获取评论
	 * 
	 * @param page
	 * @param pageSize
	 * @param uid
	 * @param spid
	 * @return
	 */
	PageResult<RSPCommentListBean> getComments(int page, int pageSize, String uid, String spid);

	/**
	 * 获取订单
	 * 
	 * @param page
	 * @param pageSize
	 * @param uid
	 * @param spid
	 * @return
	 */
	PageResult<RSPOrderListBean> getOrders(int page, int pageSize, String uid, String spid);

	/**
	 * 获取详情
	 * 
	 * @param spid
	 * @return
	 */
	RSPDetailBean getDetail(String spid);

}
